<?

	require("required/dbconnect.php");
	require("required/email.php");

	$msg="";
	
		
	$email=$_GET['email'];
	
	$match=mysql_query("select * from os_member where email='$email'");
	
	if(mysql_num_rows($match)>0)
	{
		$msg="<div class='dw_success'>Password have been sent to email you provided </div>";
		
		
	//------------------------ get data -----------------------------------
		
		
		$password=mysql_result($match,0,'password');
		
	
	
		email_forgot_password($email,$password);
		
		
		$success=1;	
	}
	else
	{
		$msg="<div class='dw_failed'>$email not found in our record, please try again or registered now.</div>";
		$success=0;
	}

?>

	<table width="100%" align="center" >
		<tr>
			<td align="center" width="100%" valign="top" >
				
			<?= $msg  ?> 	
			<? if($success==0){ ?>
			<br>
			<input type="button" value="Try Again" class="button" onclick="showFloatContent('os_ajax_forgotpwd.php','divForgotPwd','500','50',0,500)">
			<? } ?>
			</td>
		</tr>
	</table>	

